<template>
<img alt="Vue logo" src="./assets/logo.png">
<div class="text-contain">
  <readmore class="readmore" :text="info" :hideType="hideType" :maxLength="maxLength" :isImage="true" :moreText="moreText" :lessText="lessText"></readmore>
</div>
<div class="text-contain">
  <!--<readmore class="readmore" :text="infoLine" :hideType="hideTypeLine" :maxLength="maxLengthLine" :moreText="moreTextLine" :lessText="lessTextLine"></readmore>-->
  <tip class="tip" :content="infoLine" :tip="infoLine"></tip>
  <tip>
    <template v-slot:content>
      <div>Content Slot Test</div>
    </template>
    <template v-slot:tip>
      <div>Tip Slot Test</div>
    </template>
  </tip>
</div>
</template>

<script>
export default {
  name: 'App',
  // data: () => ({
  //   info: '这是一些文本这是一些文本这是一些文本这是一些文本这是一些文本这是一些文本这是一些文本这是一些文本这是一些文本这是一些文本',
  //   hideType: 'CHAR',
  //   maxLength: 40
  // })
  data: () => ({
    info: 'This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text.',
    hideType: 'LINE',
    maxLength: 1,
    moreText: '/expand.png',
    lessText: '/collapse.png',
    infoLine: 'This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text.',
    hideTypeLine: 'LINE',
    maxLengthLine: 2,
    moreTextLine: '▼',
    lessTextLine: '▲',
  })
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  background-color: #dddddd;
  margin-bottom: 200px;
}

.text-contain {
  display: flex;
}

.readmore {
  text-align: left;
  width: 200px;
  font-size: 20px;
}

.tip {
  width: 335px;
}
</style>
